package OrderService

import (
	"gdshop-back-end-go/common/libs/asynqQueue"
	"gdshop-back-end-go/common/libs/asynqQueueClient"
	"github.com/gogf/gf/frame/g"
	"github.com/gogf/gf/util/gconv"
)

// 关闭未支付订单
func AddCloseNoPayOrder(orderId int) {
	_, err := asynqQueueClient.GetClient().Enqueue(
		asynqQueueClient.GetTask(asynqQueue.CloseNoPayOrder,
			gconv.Bytes(orderId),
		))
	if err != nil {
		g.Log().Error("AddCloseNoPayOrder error ", err)
	}
}
